.border1px(@_, @color: #cbcbcb, @style: solid) {
    @media screen and (-webkit-min-device-pixel-ratio: 2) {
        position: relative;
    }
    @media screen and (-webkit-min-device-pixel-ratio:3) {
        position: relative;
    }
}

.border1px(left, @color: #cbcbcb, @style: solid) {
    border-left: 1px @style @color;
    @media screen and (-webkit-min-device-pixel-ratio: 2) {
        border-left: none;
        &:after {
            display: block;
            content: '\20';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            box-sizing: border-box;
            width: 1px;
            border-left: 1px @style @color;
            transform: scaleX(.5);
            transform-origin: left;
        }
    }
    @media screen and (-webkit-min-device-pixel-ratio:3) {
        border-left: none;
        &:after {
            display: block;
            content: '\20';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            box-sizing: border-box;
            width: 1px;
            border-left: 1px @style @color;
            transform: scaleX(.33333333);
            transform-origin: left;
        }
    }
}

.border1px(top, @color: #cbcbcb, @style: solid) {
    border-top: 1px @style @color;
    @media screen and (-webkit-min-device-pixel-ratio: 2) {
        border-top: none;
        &:after {
            display: block;
            content: '\20';
            position: absolute;
            left: 0;
            top: 0;
            right: 0;
            box-sizing: border-box;
            height: 1px;
            border-top: 1px @style @color;
            transform: scaleY(.5);
            transform-origin: top;
        }
    }
    @media screen and (-webkit-min-device-pixel-ratio:3) {
        border-top: none;
        &:after {
            display: block;
            content: '\20';
            position: absolute;
            left: 0;
            top: 0;
            right: 0;
            box-sizing: border-box;
            height: 1px;
            border-top: 1px @style @color;
            transform: scaleY(.33333333);
            transform-origin: top;
        }
    }
}

.border1px(right, @color: #cbcbcb, @style: solid) {
    border-right: 1px @style @color;
    @media screen and (-webkit-min-device-pixel-ratio: 2) {
        border-right: none;
        &:after {
            display: block;
            content: '\20';
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            box-sizing: border-box;
            width: 1px;
            border-right: 1px @style @color;
            transform: scaleX(.5);
            transform-origin: right;
        }
    }
    @media screen and (-webkit-min-device-pixel-ratio:3) {
        border-right: none;
        &:after {
            display: block;
            content: '\20';
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            box-sizing: border-box;
            width: 1px;
            border-right: 1px @style @color;
            transform: scaleX(.33333333);
            transform-origin: right;
        }
    }
}

.border1px(bottom, @color: #cbcbcb, @style: solid) {
    border-bottom: 1px @style @color;
    @media screen and (-webkit-min-device-pixel-ratio: 2) {
        border-bottom: none;
        &:after {
            display: block;
            content: '\20';
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            box-sizing: border-box;
            height: 1px;
            border-bottom: 1px @style @color;
            transform: scaleY(.5);
            transform-origin: bottom;
        }
    }
    @media screen and (-webkit-min-device-pixel-ratio:3) {
        border-bottom: none;
        &:after {
            display: block;
            content: '\20';
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            box-sizing: border-box;
            height: 1px;
            border-bottom: 1px @style @color;
            transform: scaleY(.33333333);
            transform-origin: bottom;
        }
    }
}